<template>
    <swiper :options="swiperOption">
        <swiper-slide class="m-slideimg">
            <img :src="Avatar" v-if="is_pic==1"/>
            <video :src="Avatar" :poster="cover" v-else></video>
        </swiper-slide>
        <swiper-slide v-for="(slide,index) in imglist" :key="index" class="m-slideimg">
            <img :src="slide"/>
        </swiper-slide>
        <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
</template>
<script>
export default {
    name:'',
    props:['imglist','Avatar','is_pic','cover'],    //is_pic=1:avatar 为图片，=0为视频
    data () {
        return {
            swiperOption: {
                pagination: {
                    el: '.swiper-pagination'
                },
                autoplay:true,
                // freeMode : true,
                // loop : true,
            },
            swiperSlides: [{
                plug_ad_pic:require('@/assets/images/p_02.jpg')
            },{
                plug_ad_pic:require('@/assets/images/p_02.jpg')
            }],
            base_url:process.env.API_HOST,
        }
    }
}
</script>
<style lang="less" scoped>
.m-slideimg{
    align-items: center;
    img{
        width: 100%;
    }
    video{
        width: 100%;
    }
}
</style>
